/*******************************************************************************
 * This file is part of blueprint4j www.blueprint4j.org.
 * 
 *     blueprint4j is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU Lesser General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 * 
 *     blueprint4j is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU Lesser General Public License for more details.
 * 
 *     You should have received a copy of the GNU Lesser General Public License
 *     along with blueprint4j. If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
/**
* This is an abstract message class no fields have been defined in this
* class
* $Log: MessageISOFieldHeaderOnly.java,v $
* Revision 1.1.1.1  2004/04/22 12:56:14  travisb
* Fir
*
* Revision 1.1.1.1  2003/12/21 09:04:08  jaspervdb
* no message
*
* Revision 1.1.1.1  2003/10/20 15:30:48  travisb
* First import into CVS at Cellstop
*
* Revision 1.1.1.1  2003/03/30 15:25:28  tbulford
* no message
*
* Revision 1.1  2003/01/12 08:30:34  travis
* Import x MANY
*
* Revision 1.1.1.1  2002/12/16 22:14:01  jasper
* no message
*
* Revision 1.1  2002/02/20 13:30:43  JasperV
* First time add to new Applications layer
*
* Revision 1.1  2002/01/24 14:18:14  travisb
* First Version of the Application Layer
*
*/

package blueprint4j.messages;

import java.io.*;
import java.util.*;
import java.text.*;

public class MessageISOFieldHeaderOnly extends MessageISOField {

	public MessageISOFieldHeaderOnly()
	throws ExceptionMessage {
		super();
	}

	public void read( InputStream input )
	throws ExceptionMessage, IOException {
		// Must support marks
		if (!input.markSupported()){
			throw new ExceptionMessage("Attempt to build a header message without mark supported streams.");
		}

		// Mark place in stream
		input.mark(message_type.getFieldSize()+1);
		// Read type
		message_type.read( input );
		// Reset stream
		input.reset();
	}

	public void write( OutputStream output )
	throws ExceptionMessage, IOException {
		throw new ExceptionMessage("Attempt to write a header message.");
	}
}

